-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: replaced ARCH with uname -m
#100
Conversation
In the previous commits the ARCH env variable was introduced to the Dockerfile and build_container.sh scripts. It was meant to help with configuration of linux headers for musl-tools, but did not work for some reason. Considering the build_container.sh was already using `uname -m` calls to get the current arch this commit also uses it, so there is no need for ARCH anymore. Signed-off-by: Egor Lazarchuk <[email protected]>
The CI seems finished, can you confirm that everything is fine? What about failing the build if something is wrong? |
I'm actually quite confused why it doesn't fail if something is wrong. The bash script has |
So as I can see the problematic step finished without errors: https://github.com/rust-vmm/rust-vmm-container/actions/runs/7412574298/job/20169661451?pr=100#step:8:1500 |
This is a good point! Does anyone know why CI did not fail here, but executed the next command? |
Mhh, I think it has something to do with the #!/bin/bash
set -e
false
echo "hi" prints nothing, while #!/bin/bash
set -e
false && echo "hello"
echo "hi" prints "hi". Bash 😖 |
Given that we have |
Yeah, I agree. Or we should add |
Removed && from the script because they were causing the script build to succeed even if errors were occurring. Signed-off-by: Egor Lazarchuk <[email protected]>
There are several places that need current arch of the system to install/configure the container. This commit replaces separate calls of $(uname -m) with one global ARCH variable. Signed-off-by: Egor Lazarchuk <[email protected]>
Added couple of commits to remove |
Just to check that the build now fails if something in the script is wrong, can we try to remove the definition of |
Without ...
+ pushd /usr/include/-linux-musl
/opt/src/scripts/build_container.sh: line 21: pushd: /usr/include/-linux-musl: No such file or directory
The command '/bin/sh -c /opt/src/scripts/build_container.sh' returned a non-zero code: 1 |
This version adds fixes needed for musl-tools package to properly find linux headers. More info in rust-vmm/rust-vmm-container#99 and rust-vmm/rust-vmm-container#100 Signed-off-by: Egor Lazarchuk <[email protected]>
This version adds fixes needed for musl-tools package to properly find linux headers. More info in rust-vmm/rust-vmm-container#99 and rust-vmm/rust-vmm-container#100 Signed-off-by: Egor Lazarchuk <[email protected]>
This version adds fixes needed for musl-tools package to properly find linux headers. More info in rust-vmm/rust-vmm-container#99 and rust-vmm/rust-vmm-container#100 Signed-off-by: Egor Lazarchuk <[email protected]>
Summary of the PR
In the previous commits/PR (#99, #98) the ARCH
env variable was introduced to the Dockerfile
and build_container.sh scripts. It was meant to
help with configuration of linux headers for
musl-tools, but did not work for some reason.
Considering the build_container.sh was already
using
uname -m
calls to get the current archthis commit also uses it, so there is no need
for ARCH anymore.
Also removed
&&
from the scripts and moved$(uname -m)
to one global var.For reviewers: don't approve before the CI is finished and it is clear that this PR fixes the issue.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.